<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'menu.label', default: 'Menu')}"/>

    <title>菜单：${this.menu?.name}</title>
</head>

<body>

<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>菜单：${this.menu?.name}</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link action="index" controller="menu">菜单列表</g:link>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">菜单：${this.menu?.name}</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">

            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>菜单：${this.menu?.name}</h5>

                    <div class="card-header-right">
                        <g:link action="edit" resource="${this.menu}" data-toggle="tooltip" data-placement="top"
                                title="" data-original-title="编辑">
                            <i class="icofont icofont-edit"></i>
                        </g:link>

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">
                    <div class="form-group row">
                        <label class="col-md-2 col-form-label">菜单名称</label>

                        <div class="col-md-3">
                            <span class="cont">${this.menu?.name}</span>
                        </div>

                    </div>

                </div>

            </div>

            <div class="card">
                <div class="card-header">
                    <h5>菜单列表</h5>

                    <div class="card-header-right">
                        <g:link action="create" controller="menuItem" params="[menu: this.menu.id]"
                                data-toggle="tooltip"
                                data-placement="top" title=""
                                data-original-title="新增"><i class="icofont icofont-plus"></i></g:link>


                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                            <div class="table-responsive">
                                <table class="table table-striped table-hover table-bordered">
                                    <thead>
                                    <tr>
                                        <g:sortableColumn width="10%" property="name" title="名称"/>
                                        <g:sortableColumn width="5%" property="displayOrder" title="显示顺序"/>
                                        <g:sortableColumn width="10%" property="type" title="类型"/>
                                        <g:sortableColumn width="10%" property="parent" title="父级"/>
                                        <g:sortableColumn width="45%" property="linkUrl" title="链接"/>
                                        <g:sortableColumn width="10%" property="icon" title="图标class"/>
                                        <th width="10%" class="text-center" colspan="2">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <g:each in="${this.menu?.items}">
                                        <tr>
                                            <td>${it.name}</td>
                                            <td>${it?.displayOrder}</td>
                                            <td>${it?.type}</td>
                                            <td>${it?.parent?.name}</td>
                                            <td>${it.linkUrl}</td>
                                            <td>${it.icon}</td>
                                            <td class="text-center">
                                                <g:link class="m-r-15 text-primary"
                                                        controller="menuItem" action="edit"
                                                        id="${it?.id}">
                                                    <i class="icofont icofont-ui-edit"></i>
                                                </g:link>

                                                <g:form controller="menuItem" action="delete" class="inline"
                                                        id="${it.id}" method="DELETE">
                                                    <button class="deleteBtn text-danger" type="button">
                                                        <i class="icofont icofont-trash"></i>
                                                    </button>
                                                </g:form>

                                            </td>

                                        </tr>
                                    </g:each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!-- Hover table card end -->
        </div>

        <!-- Page-body end -->

    </div>
</div>

</body>

</html>





